package com.quick.controller;

import com.quick.annotation.Lock;
import com.quick.annotation.RedisLock;
import com.quick.base.Page;
import com.quick.base.Search;
import com.quick.love.search.LoveUserSearch;
import com.quick.love.vo.LoveUserVo;
import com.quick.service.ILoveUserService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("api/love/user")
@Api(tags = "相亲用户")
public class LoveUserController {

    @Autowired
    private ILoveUserService loveUserService;

    @PostMapping("search")
    @ApiOperation("相亲用户分页查询")
    @RedisLock
    @Lock
    public Page<LoveUserVo> search(@RequestBody Search<LoveUserSearch> search){
        return loveUserService.search(search);
    }
}
